<template>
  <div>
    <van-cell-group>
      <van-field
        autofocus
        v-model="value"
        :label="label"
        :placeholder="placeholder"
        :type="type"
        :rule="rule"
        class="text"
      />
    </van-cell-group>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: "",
    };
  },
  props: ["label","placeholder","type","rule"],
  methods:{
    
  },
  watch:{
    value(){
      this.$emit('inputChange',this.value)
    }
  }
};
</script>

<style>
.van-cell-group .van-cell{
  margin-top: 15px;
  padding: 8px;
}
.text{
  margin-top: 15px;
  padding: 8px;
}
</style>
